<?php

namespace App\Http\Controllers\Web;

use App\Http\Controllers\BaseController;
use App\Models\Feedback;
use Illuminate\Http\Request;

class FeedbackController extends BaseController
{
    public function back(Request $request){
        $request->validate([
            'back_sub'=>'required'
        ],[
            'back_sub.required' => '反馈意见 不能为空'
        ]);
        $in = $request->all();
        $in['user_id'] = auth('api')->user()->id;
        Feedback::create($in);
        return $this->response->created();
    }
}
